/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package transport;

/**
 *
 * @author Miguel
 */
public class Transport {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Clock temps = new Clock();
        Station s1 = new Station("Station1", new int[]{420,780}, new int[]{600,1200});
        Station s2 = new Station("Station2", new int[]{900,1500}, new int[]{600,1200});
        Central c = new Central();
        Chariot[] chs = new Chariot[5];
        chs[0] = new Chariot("Chariot1", s1, c);
        chs[1] = new Chariot("Chariot2", s1, c);
        chs[2] = new Chariot("Chariot3", s2, c);
        chs[3] = new Chariot("Chariot4", s2, c);
        chs[4] = new Chariot("Chariot5", s2, c);
        
        do{
            for(int a = 0;a<chs.length;a++){
                chs[a].dos();
            }
        }while(temps.add() < 28800);//un jour de travail de 8h
        for(Chariot voiture : chs){
            System.out.println(voiture.getNom() + " : " + voiture.getNbDechargement() + ", " + voiture.getAttentPourCharger() + ", " + voiture.getAttentPourDecharger());
        }
    }
}
